/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package dieci.hibernate;

import dieci.database.PersistentObject;

/**
 *
 * @author Blanco
 */
public class HibReturnDetailId implements PersistentObject{

    private Long returnId;
    private Long productId;

    public HibReturnDetailId()
    {
    }

    public HibReturnDetailId(Long returnId, Long productId)
    {
        this.returnId = returnId;
        this.productId = productId;
    }
        
    
    /**
     * Get the value of returnId
     *
     * @return the value of returnId
     */
    public Long getReturnId()
    {
        return returnId;
    }

    /**
     * Set the value of returnId
     *
     * @param returnId new value of returnId
     */
    public void setReturnId(Long returnId)
    {
        this.returnId = returnId;
    }

    public Long getProductId()
    {
        return productId;
    }

    public void setProductId(Long productId)
    {
        this.productId = productId;
    }

    
    @Override
    public boolean equals (Object obj)
    {
        if (this == obj)
            return true;
        if (obj == null)
            return false;
        if (!(obj instanceof HibReturnDetailId))
            return false;
        final HibReturnDetailId other = (HibReturnDetailId) obj;
        if (!this.getReturnId().equals(other.getReturnId()))
            return false;
        if (!this.getProductId().equals(other.getProductId()))
            return false;
        return true;
    }

    @Override
    public int hashCode ()
    {
        int hash = 7;
        hash = 61 * hash + (int) (this.getReturnId() ^ (this.getReturnId() >>> 32));
        hash = 61 * hash + (int) (this.getReturnId().hashCode() ^ (this.getReturnId().hashCode() >>> 31));
        return hash;
    }

    
}
